@import "src/assets/styles/variable";
@import "../../assets/styles/normal";
@import "src/assets/styles/print";

pagenote-aside{
  position: fixed;
  max-height: 95vh;
  overflow: auto;
  right: 2px;
  z-index: 99991;
  top: 0;
  width: 220px;
  user-select: none;
  background: #fff;
  transition: width 0.2s ease-out;
  border-radius: 4px;
  box-shadow: 0px 0px 5px 0px #efefef;
  &[data-status="expand"]{
    //border: none;
    //width: 18px;
    //height: 24px;
    //background: transparent;
    //box-shadow:none;
    //pagenote-actions{
    //  background: none;
    //  padding: 0;
    //}
    pagenote-infos,pagenote-description{
      display: none;
    }
    //pagenote-action-group{
    //  display: none;
    //}
    //pagenote-action[data-action=toggle]{
    //  &[data-status='expand']{
    //    transform: rotate(180deg);
    //    transform-origin: center;
    //  }
    //}
    pagenote-lights{
      overflow: hidden;
      max-height: 0;
    }
  }
  //&:hover{
  //  pagenote-actions,pagenote-description,pagenote-infos,pagenote-light-highlight,pagenote-light-aside-item-container{
  //    opacity: 1;
  //  }
  //}
}

pagenote-actions,pagenote-description,pagenote-infos{
  //opacity: 0;
  //transition: opacity 0.5s;
  padding: 6px 12px;
}


pagenote-actions{
  box-sizing: border-box;
  position: relative;
  display: flex;
  color: #fff;
  font-size: 13px;
  border-bottom: 1px solid #efefef;
  padding-bottom: 6px;
  font-weight: 400;
  white-space: nowrap;
  text-align: left;
  text-overflow: ellipsis;
  -webkit-transition: all .25s ease-out;
  transition: all .25s ease-out;

  pagenote-action {
    display: inline-block;
    cursor: pointer;
    //width: 18px;
    //height: 18px;
    //box-sizing: border-box;
    //margin-right: 1px;
    //background-size: contain;
    //overflow: hidden;
    //background-color: $target-default-color;
    //border: 1px solid $target-default-color;
    //border-radius: 2px;
    &[data-action=toggle]{
      position: absolute;
      top:2px;
      right: 12px;
      transform: rotate(180deg);
      &[data-status='expand']{
        transform: rotate(0deg);
        transform-origin: center;
      }
    }
  }
}



pagenote-description{
  color: #8f959e;
  font-size: 12px;
  max-height: 2.828em;
  overflow: hidden;
  text-overflow: ellipsis;
}

pagenote-lights{
  max-height: 80vh;
  transition: max-height 0.3s ease-in-out;
  //overflow-y: auto;
  //padding: 1px;
  pagenote-light-aside-mask{
    display: block;
    width: 100%;
    width: calc(100% + 10px);
    height: 0;
    position: absolute;
    top: 0px;
    right: 0;
    box-shadow: rgba(213,223, 230,.6) 0px 0px 19px 2px;
    background: #fff;
    transition: all 0.2s ease-in-out;
  }
  pagenote-light-aside-item{
    position: relative;
    display: block;
    left: 0;
    top: 0;
    font-size: 12px;
    line-height: 20px;
    text-align: left;
    cursor: pointer;
    box-sizing: border-box;
    margin: 4px 0;
    transition: all 0.3s ease-in-out;

    pagenote-light-aside-item-container{
      display: block;
      background: #fff;
      padding: 6px 6px 6px 36px;
      box-sizing: border-box;
    }

    pagenote-light-anotation{
      //position: absolute;
      max-height: 0;
      min-width: 200px;
      padding: 0;
      overflow: hidden;
      color: $anotation-fontcolor;
      background: #fff;
      display: block;
      right: 0;
      /* border: 1px solid #d5d5d5; */
      //top: 100%;
      box-shadow: 0 0px 2px 0px var(--shadow-color);
      border-radius: 0 0 4px 4px;
      transition: all 0.3s;
      pagenote-block{
        padding: 4px 12px;
      }
    }


    pagenote-light-actions-container{
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      display: none;
      opacity: 0;
      padding: 4px 0 4px 36px;
      background: #fff;
      box-sizing: border-box;
      &:hover{
        display: block;
        opacity: 1;
      }
    }

    pagenote-light-aside-item-sign{
      position: absolute;
      top: 10px;
      right: unset;
      left: 12px;
    }




    // 激活 & 视野内
    &[data-active='1'][data-insign="1"]{
      pagenote-light-aside-item-container{
        font-weight: bold;
        display: block;
        // box-shadow: 0 0 2px 0px var(--shadow-color);
        // border-radius: 4px 4px 0 0;
      }
      pagenote-light-aside-item-sign{
        background-color: var(--color);
      }
      pagenote-light-anotation{
        max-height: 200px;
        overflow: auto;
      }
    }

    &[data-dot="1"]{
      pagenote-light-aside-item-container{
        display: none;
        width: 200px;
        font-size: 12px;
        background: #ffff;
        padding: 6px 12px 6px 6px;
        border-radius: 4px 4px 0 0;
        transition: box-shadow 0.4s ease-in-out;
      }
      pagenote-light-actions-container{
        top: -22px;
        padding: 4px;
      }
      &:hover {
        pagenote-light-actions-container{
          display: block;
          opacity: 1;
        }
      }
    }




    &:hover{
      z-index: 99;
      pagenote-light-aside-item-container{
        display: block;
        opacity: 1;
      }
    }
  }
}

pagenote-light-aside-item-sign{
  position: relative;
  z-index: 1;
  width: 16px;
  height: 4px;
  margin-right: 2px;
  background: #fff;
  display: inline-block;
  border: 1px solid var(--color,$target-default-color);
  border-radius: 4px;
  vertical-align: super;
  cursor: pointer;
  transition: all 0.5s ease-in;
  &[data-level="2"]{
    width: 10px;
  }
  &[data-switch='1']{
    //opacity: 0;
    z-index: 9;
    top: 22px;
    transition: all 0.3s;
  }
  &[data-active='1'],&[data-active='2']{
    background-color: var(--color,$target-default-color);
  }
  &[data-active='2']{
    &::after{
      content: "";
      position: absolute;
      right: -3px;
      bottom: -3px;
      display: block;
      width: 6px;
      height: 3px;
      border-radius: 2px;
      background-color: #fff;
      border: 1px solid var(--color,$target-default-color);
    }
  }
  // 视野内
  &[data-insign='1']{
    // transform: translateX(-6px);
    // width: 20px;
    // height: 8px;
    &::before{
      content: "";
      position: absolute;
      left: -8px;
      top: 0;
      width: 4px;
      height: 4px;
      border-radius: 4px;
      background-color: #fff;
      box-shadow: 0px 0px 0px 1px #636363;
    }
  }

  &:hover{
    opacity: 1;
    &+ pagenote-light-actions-container{
      opacity: 1;
      display: block;
      &{
        opacity: 1;
      }
    }
  }
}

pagenote-snapshots{
  margin: 6px 0;
  pagenote-snapshot{
    display: inline-block;
    position: relative;
    &:hover{
      pagenote-icon{
        display: block;
      }
    }

    pagenote-icon{
      position: absolute;
      top: 16px;
      left: 1px;
      display: none;
    }
    img{
      width: 18px;
      height: 18px;
      box-sizing: border-box;
      margin-right: 2px;
      cursor: zoom-in;
      border-radius: 4px;
      border: 1px solid #e5e5e5;
    }
  }
}



